from sqlalchemy import create_engine
from sqlalchemy.orm import declarative_base,sessionmaker

#数据库的对象
HOST = '127.0.0.1'
PORT = 3306
DATABASE = 'itbz'
USER = 'root'
PWD = 'root'
DB_URI = f'mysql+pymysql://{USER}:{PWD}@{HOST}:{PORT}/{DATABASE}'

#创建引擎
engine = create_engine(DB_URI)
Base = declarative_base()
Session = sessionmaker(engine)